﻿using System;

namespace NetMicro.Core.Exceptions
{
    /// <summary>
    /// DB服务接口异常
    /// </summary>

    public class DbServiceBusException : ExceptionBase
    {
        private readonly string _message;
        public DbServiceBusException()
            : this("")
        {
        }
        public DbServiceBusException(string message)
            : this(message, null)
        {
        }
        public DbServiceBusException(Exception exception)
            : this("", exception)
        {
        }
        public DbServiceBusException(string message, Exception exception)
            : this(message, 0, exception)
        {
        }
        public DbServiceBusException(string message, int code)
           : this(message, code, null)
        {
        }
        public DbServiceBusException(string message, int code, Exception exception)
            : base(message, code, exception)
        {
            _message = message;
        }
        public override string Message => $"{"DB服务接口异常"}.{_message}";
    }
}
